/*
 * @Description: 机构管理-接口
 * @Date: 2023-11-16 14:14:42
 * @FilePath: \hk-computerRoom-Security\src\api\configuration\regionalLocation\index.ts
 */
import request from '/@/utils/request';

/**
 * @method queryArea 查询指定机构所属的区域位置信息
 * @method delArea 删除区域信息
 * @method saveArea 保存区域位置信息
 * @method updateArea 修改区域位置信息
 */
export function useRegionalLocationApi() {
  return {
    queryArea: (params: object) => {
      return request({
        url: '/api/area/queryArea',
        method: 'POST',
        data: params,
      });
    },
    delArea: (id: string) => {
      return request({
        url: `/api/area/delete/${id}`,
        method: 'DELETE',
      });
    },
    saveArea: (params: object) => {
      return request({
        url: '/api/area/save',
        method: 'POST',
        data: params,
      });
    },
    updateArea: (params: object) => {
      return request({
        url: '/api/area/update',
        method: 'PUT',
        data: params,
      });
    },
  }
}
